package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "bi_cardef", schema = "ams", catalog = "")
public class BiCardefEntity {
    private String cartypeid;
    private String cartypename;
    private String carvol;
    private String caryear;
    private String gearboxtype;
    private Integer gearboxshifts;

    @Id
    @Column(name = "cartypeid")
    public String getCartypeid() {
        return cartypeid;
    }

    public void setCartypeid(String cartypeid) {
        this.cartypeid = cartypeid;
    }

    @Basic
    @Column(name = "cartypename")
    public String getCartypename() {
        return cartypename;
    }

    public void setCartypename(String cartypename) {
        this.cartypename = cartypename;
    }

    @Basic
    @Column(name = "carvol")
    public String getCarvol() {
        return carvol;
    }

    public void setCarvol(String carvol) {
        this.carvol = carvol;
    }

    @Basic
    @Column(name = "caryear")
    public String getCaryear() {
        return caryear;
    }

    public void setCaryear(String caryear) {
        this.caryear = caryear;
    }

    @Basic
    @Column(name = "gearboxtype")
    public String getGearboxtype() {
        return gearboxtype;
    }

    public void setGearboxtype(String gearboxtype) {
        this.gearboxtype = gearboxtype;
    }

    @Basic
    @Column(name = "gearboxshifts")
    public Integer getGearboxshifts() {
        return gearboxshifts;
    }

    public void setGearboxshifts(Integer gearboxshifts) {
        this.gearboxshifts = gearboxshifts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiCardefEntity that = (BiCardefEntity) o;

        if (cartypeid != null ? !cartypeid.equals(that.cartypeid) : that.cartypeid != null) return false;
        if (cartypename != null ? !cartypename.equals(that.cartypename) : that.cartypename != null) return false;
        if (carvol != null ? !carvol.equals(that.carvol) : that.carvol != null) return false;
        if (caryear != null ? !caryear.equals(that.caryear) : that.caryear != null) return false;
        if (gearboxtype != null ? !gearboxtype.equals(that.gearboxtype) : that.gearboxtype != null) return false;
        if (gearboxshifts != null ? !gearboxshifts.equals(that.gearboxshifts) : that.gearboxshifts != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = cartypeid != null ? cartypeid.hashCode() : 0;
        result = 31 * result + (cartypename != null ? cartypename.hashCode() : 0);
        result = 31 * result + (carvol != null ? carvol.hashCode() : 0);
        result = 31 * result + (caryear != null ? caryear.hashCode() : 0);
        result = 31 * result + (gearboxtype != null ? gearboxtype.hashCode() : 0);
        result = 31 * result + (gearboxshifts != null ? gearboxshifts.hashCode() : 0);
        return result;
    }
}
